package com.ruoyi.shopping.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.ruoyi.shopping.domain.CommodityDeliveryAddress;

import java.util.List;

/**
 * 收货地址Mapper接口
 * 
 * @author ruoyi
 * @date 2024-08-14
 */
public interface CommodityDeliveryAddressMapper extends BaseMapper<CommodityDeliveryAddress>
{
    /**
     * 查询收货地址
     * 
     * @param id 收货地址主键
     * @return 收货地址
     */
    public CommodityDeliveryAddress selectCommodityDeliveryAddressById(Long id);

    /**
     * 查询收货地址列表
     * 
     * @param commodityDeliveryAddress 收货地址
     * @return 收货地址集合
     */
    public List<CommodityDeliveryAddress> selectCommodityDeliveryAddressList(CommodityDeliveryAddress commodityDeliveryAddress);

    /**
     * 新增收货地址
     * 
     * @param commodityDeliveryAddress 收货地址
     * @return 结果
     */
    public int insertCommodityDeliveryAddress(CommodityDeliveryAddress commodityDeliveryAddress);

    /**
     * 修改收货地址
     * 
     * @param commodityDeliveryAddress 收货地址
     * @return 结果
     */
    public int updateCommodityDeliveryAddress(CommodityDeliveryAddress commodityDeliveryAddress);

    /**
     * 删除收货地址
     * 
     * @param id 收货地址主键
     * @return 结果
     */
    public int deleteCommodityDeliveryAddressById(Long id);

    /**
     * 批量删除收货地址
     * 
     * @param ids 需要删除的数据主键集合
     * @return 结果
     */
    public int deleteCommodityDeliveryAddressByIds(Long[] ids);
    /**
     * 根据货主ID查询收货地址
     */
    public List<CommodityDeliveryAddress> selectByCargoId(Long cargoId);
}
